package org.aplikator.client.shared.data;

import org.aplikator.client.shared.descriptor.ViewDTO;
import org.jboss.errai.common.client.api.annotations.Portable;

import java.io.Serializable;

@SuppressWarnings("serial")
@Portable
public class ContainerNode implements Serializable {
    //private ViewDTO view;
    private String viewId;
	private Record original;
    private Record edited;
    private Operation operation;

    @SuppressWarnings("unused")
    public ContainerNode() {//TODO custom marshaller
    }

    public ContainerNode(String viewId, Record original, Record edited, Operation operation) {
        this.viewId = viewId;
        this.original = original;
        this.edited = edited;
        this.operation = operation;
    }

//    public ViewDTO getView() {
//        return view;
//    }
    
    public String getViewId() {
		return viewId;
	}
    
    public void setViewId(String viewId) {
		this.viewId = viewId;
	}
    
    public Record getOriginal() {
        return original;
    }

    public Record getEdited() {
        return edited;
    }

    public Operation getOperation() {
        return operation;
    }

//    public void setView(ViewDTO view) {
//        this.view = view;
//    }

    public void setOriginal(Record original) {
        this.original = original;
    }

    public void setEdited(Record edited) {
        this.edited = edited;
    }

    public void setOperation(Operation operation) {
        this.operation = operation;
    }

}
